package com.zhangyu.shadow.repair.delegate.dept;


import com.zhangyu.shadow.repair.base.IStringDataConvert;
import com.zhangyu.shadow.repair.delegate.bean.OrgDeptBean;

import java.util.List;

import io.reactivex.disposables.Disposable;
import st.lib.base.delegate.mvp.BaseModel;
import st.lib.base.delegate.mvp.BasePresenter;
import st.lib.base.delegate.mvp.BaseView;
import st.lib.base.net.callback.IError;

/**
 * Description:
 *
 * @author Hequn.Lee
 * @date 2018/11/5
 */
public interface DeptContract {

    interface View extends BaseView {
        void getOrgDeptSucceed(List<OrgDeptBean> orgDeptBean);

        void getOrgDeptFailed(int code, String msg);

        void setPersonOrgDeptSucceed();

        void setPersonOrgDeptFailed(int code, String msg);
    }

    interface Model extends BaseModel {
        Disposable getOrgDept(IStringDataConvert<List<OrgDeptBean>> success,
                              IError error);

        Disposable setPersonOrgDept(String personId,
                                    String deptId,
                                    String groupId,
                                    IStringDataConvert<String> success,
                                    IError error);
    }

    abstract class Presenter extends BasePresenter {
        abstract void getOrgDept();

        abstract void setPersonOrgDept(String personId,
                                       String deptId,
                                       String groupId);
    }
}
